<%@page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>首页</title>
<meta name="keywords" content="" />
<meta name="description" content="" />
<meta content="zh-cn" http-equiv="content-language" />
<meta content="" name="copyright" />


<%@ include file="/page/pc/include.jsp"%>

<script type="text/javascript" src="<%=basePath %>/statics/js/jquery.SuperSlide.2.1.1.js"></script>
<!--[if lte IE 6]> 
<script type="text/javascript" src="js/PNG.js"></script> 
<script> 
PNG.fix('*'); 
</script> 
<![endif]-->

<script type="text/javascript">

	$(function() {
		$('a.backtop').click(function() {
			$('body,html').animate({
				scrollTop : 0
			}, 1000);
		});
		//侧边菜单
		$(window).scroll(function() {
			$scrollTo = $(window).scrollTop();

			if ($scrollTo > 100) {
				$('#fixedfloor').show().addClass('fixedfloor');
			} else {
				$('#fixedfloor').hide();
			}
		}).trigger('scroll');
		
		//点击楼层图标跳转到对应的楼层
		$('#fixedfloor ul li a').click(function() {
			$.dot_not_scoll = true;
			$idx = $(this).parents('#fixedfloor').find('a').index($(this));
			$target = $('.hd').find('b').eq($idx);
			$top = parseInt($target.offset().top);

			$('body,html').animate({
				scrollTop : $top
			}, 1000);
			$.dot_not_scoll = undefined;
		});

	});

	$('#fixedfloor li').hover(function() {
		$(this).addClass('current');
	}, function() {
		$(this).removeClass('current');
	});

	//显示当前可看到的最小楼层对应的侧边菜单文字
	$(window).bind("scroll",function(event) {
		var s = undefined;
		$('.hd h3 b').each(function() {
			var thisTop = parseInt($(window).scrollTop()); //屏幕顶部距离最顶部的高度
			var thisButtomTop = parseInt($(window).height()) + thisTop;
			var currTop = parseInt($(this).offset().top);
			if (currTop >= thisTop && currTop <= thisButtomTop && $.dot_not_scoll == undefined) {
				$idx = $('.hd h3 b').index($(this));
				if (s == undefined) {
					s = true;
					$('#fixedfloor li').removeClass('current');
					$('#fixedfloor').find('li').eq($idx).addClass('current');
				}
			}
		});
	});
</script>

</head>
<body>
	<div class="wrap">
		<!---头部公共部分开始-->
		<jsp:include page="../header.jsp" ></jsp:include>
		<!---头部公共部分结束-->
		<div class="header">
			
			<div class="index_nav">
				<div class="index_nav_con">
					<div id="category" class="category">
						<div class="category-bg"></div>
						<h2>
							<a href="#"> 企业商品分类 </a>
						</h2>
						<div class="cate-list" style="display: block">
							<ul id="J_category" load="1">
								<%--循环商品类型开始 --%>
								<c:forEach items="${categoryList}" var="category">
								<li onmouseover="this.className='hover'" onmouseout="this.className=''">
									<div class="cate-item">
										<h3>
											<a href="#">
												<i>
													<img src="${imgRootURL }${category.categoryImage }?x-oss-process=image/resize,m_pad,h_28,w_28" onerror="this.src='${rootPath}/statics/images/left_icon1.png'"/>
												</i>
												<span>${category.categoryName}</span>
												<em>&gt;</em>
											</a>
										</h3>
									</div>
									<div class="cate-list-expand">
										<div class="c_box">
											<div class="c_left">
												<dl>
													<%--
													<dt>
														<a href="商品列表.htm">子类型</a>
													</dt>
													--%>
													<dd>
														<c:forEach items="${category.subCategoryList}" var="subCategory">
															<a href="${rootPath}/pc/product/search?categoryId=${subCategory.id}">${subCategory.categoryName}</a>
														</c:forEach>
													</dd>
												</dl>
											</div>
											<div class="c_right">
												<a href="${category.advertisementUrl }">
													<img src="${imgRootURL }${category.advertisementImage }"onerror="this.src='${rootPath}/statics/images/ed4.jpg'" />
												</a>
											</div>
										</div>
									</div>

								</li>
								
								</c:forEach>
								<%--循环商品类型结束 --%>
							</ul>
						</div>
					</div>
					<div class="site_nav">
						<ul>
							<li><a href="${rootPath}/pc/index">首页</a></li>
							<li><a href="${rootPath}/pc/product/search">商品列表</a></li>
							<li><a href="${rootPath}/pc/index#sydn">商用电脑</a></li>
							<li><a href="${rootPath}/pc/index#ppg">品牌馆</a></li>
						</ul>
					</div>
				</div>
			</div>
		</div>
	</div>


	<script charset="utf-8" language="javascript" type="text/javascript" src="<%=basePath%>/statics/js/nav.js"></script>
	<script language="JavaScript" src="<%=basePath%>/statics/js/sme.base.js"></script>
	<!---左侧楼层导航结束-->
	<script type="text/javascript" src="<%=basePath %>/js/home/index.js"></script>

</body>
</html>